<template>
  <div>
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm"
      label-width="100px" class="demo-ruleForm form">
        <el-form-item label="角色名称" prop="roleName">
            <el-input v-model="ruleForm.roleName"></el-input>
        </el-form-item>
        <slot name="fnRange"></slot>
    </el-form>
  </div>
</template>

<script>
export default {
    props:{
        name:{type:String,default:""},
        ruleForm:{type:Object,default:function fn(){ return {}}}
    },
    data() {
        return {
            rules: {
                name: [
                    { required: true, message: "请输入角色名称", trigger: "blur" },
                    { min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" },
                ],
                fnRange: [
                    { required: true, message: "请选择功能范围", trigger: "blur" },
                    { min: 3, max: 20, message: "长度在 3 到 20 个字符", trigger: "blur" },
                ],
            },
        }
    },
};
</script>

<style lang="less" scoped>
</style>